/**
 * Created by PengWei on 2018/7/16.
 */
namespace mengdao {
    export class UID {
        public static guid():string {
            let s4 = this.s4;
            return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
        }

        private static s4():string{
            return Math.floor((1 + Math.random()) * 0x10000)
                .toString(16)
                .substring(1);
        }
    }
}